package com.zhiwang.planet.ui.webview_ultimate

import android.webkit.ConsoleMessage
import android.webkit.WebView
import com.zhiwang.planet.ui.WebViewPageHandler

interface Interceptor {


    fun initLoad(webView: WebView, url: String)

    fun onPrepareSetting(webView: WebView)


    @Interceptable
    fun onGoBack(handler: WebViewPageHandler, webView: WebView): Boolean


    fun onPageStart(webView: WebView)


    fun onPageFinish(webView: WebView)


    fun onPageProgress(webView: WebView, progress: Int)


    @Interceptable
    fun shouldInterceptUrlLoading(webView: WebView, url: String): Boolean


    fun onConsoleMessage(webView: WebView, consoleMessage: ConsoleMessage): Boolean


    fun onDestroy()


    fun onResume(webView: WebView)

    fun onPause(webView: WebView)

    fun onStop(webView: WebView)

}